package cn.ncupyh.comptest;

import java.util.Scanner;

//求一个整数的二进制的奇数位和偶数位
public class BinaryOddEvenNumber {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int in = s.nextInt();//input
        //偶数位
        for (int i = 31; i >= 1; i-=2) {
            System.out.print(((in>>i) & 1) + " ");
        }
        System.out.println();
        //奇数位
        for (int i = 30; i >= 0; i-=2) {
            System.out.print(((in>>i) & 1) + " ");
        }
    }
}
